import Vue from 'vue'
import Vuex from 'vuex'
import preState from 'vuex-persistedstate'

import login from './modules/login'
import menu from './modules/menu'
import user from './modules/user'

Vue.use(Vuex)

const store = new Vuex.Store({
  modules: {
    login,
    menu,
    user,
  },
  state: {},
  mutations: {},
  actions: {},
  plugins: [
    preState({
      // storage: window.sessionStorage,
    }),
  ],
})

export default store
